package com.supermap.application.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 行业指标表
 * Created by sun'fei on 2018-01-01.
 */
@Entity
@Table(name = "T_INDUSTRY_DATA")
public class TIndustryData {

    //ID
    private String id;
    //数据版本 (YYYY-MM-DD HH24:mm:ss)
    private String version;
    //行业编号
    private String A00011;
    //行业大类 （最大类为0）
    private String A00012;
    //行业名称
    private String industryName;
    //行业级别
    private String industryLevel;
    //报告期类型
    private String reportType;
    //报告期时间 （YYYY-MM-DD）
    private String reportTime;
    //预留字段
    private String flag_a;
    private String flag_b;
    private String flag_c;
    private String flag_d;
    private String flag_e;

    public TIndustryData() {
    }

    public TIndustryData(String id, String version, String a00011, String a00012, String industryName, String industryLevel, String reportType, String reportTime, String flag_a, String flag_b, String flag_c, String flag_d, String flag_e) {
        this.id = id;
        this.version = version;
        A00011 = a00011;
        A00012 = a00012;
        this.industryName = industryName;
        this.industryLevel = industryLevel;
        this.reportType = reportType;
        this.reportTime = reportTime;
        this.flag_a = flag_a;
        this.flag_b = flag_b;
        this.flag_c = flag_c;
        this.flag_d = flag_d;
        this.flag_e = flag_e;
    }

    @GenericGenerator(name = "generator", strategy = "increment")
    @Id
    @GeneratedValue(generator = "generator")
    @Column(name = "ID", unique = true, nullable = false, precision = 10, scale = 0)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Column(name="VERSION", length=100)
    public String getVersion() {
        return this.version == null ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) : this.version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    @Column(name = "A00011", length = 100)
    public String getA00011() {
        return A00011;
    }

    public void setA00011(String a00011) {
        A00011 = a00011;
    }

    @Column(name = "A00012", length = 100)
    public String getA00012() {
        return A00012;
    }

    public void setA00012(String a00012) {
        A00012 = a00012;
    }

    @Column(name = "INDUSTRY_NAME", length = 100)
    public String getIndustryName() {
        return industryName;
    }

    public void setIndustryName(String industryName) {
        this.industryName = industryName;
    }

    @Column(name = "INDUSTRY_LEVEL", length = 100)
    public String getIndustryLevel() {
        return industryLevel;
    }

    public void setIndustryLevel(String industryLevel) {
        this.industryLevel = industryLevel;
    }

    @Column(name = "REPORT_TYPE", length = 100)
    public String getReportType() {
        return reportType;
    }

    public void setReportType(String reportType) {
        this.reportType = reportType;
    }

    @Column(name = "REPORT_TIME", length = 100)
    public String getReportTime() {
        return reportTime;
    }

    public void setReportTime(String reportTime) {
        this.reportTime = reportTime;
    }

    @Column(name = "FLAG_A", length = 100)
    public String getFlag_a() {
        return flag_a;
    }

    public void setFlag_a(String flag_a) {
        this.flag_a = flag_a;
    }

    @Column(name = "FLAG_B", length = 100)
    public String getFlag_b() {
        return flag_b;
    }

    public void setFlag_b(String flag_b) {
        this.flag_b = flag_b;
    }

    @Column(name = "FLAG_C", length = 100)
    public String getFlag_c() {
        return flag_c;
    }

    public void setFlag_c(String flag_c) {
        this.flag_c = flag_c;
    }

    @Column(name = "FLAG_D", length = 100)
    public String getFlag_d() {
        return flag_d;
    }

    public void setFlag_d(String flag_d) {
        this.flag_d = flag_d;
    }

    @Column(name = "FLAG_E", length = 100)
    public String getFlag_e() {
        return flag_e;
    }

    public void setFlag_e(String flag_e) {
        this.flag_e = flag_e;
    }
}
